<!DOCTYPE html>
<html lang="en">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <!-- Meta, title, CSS, favicons, etc. -->
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="icon" href="images/favicon.ico" type="image/ico" />

  <title>HRs!</title>

  <!-- Bootstrap -->
  <link href="../vendors/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
  <!-- Font Awesome -->
  <link href="../vendors/font-awesome/css/font-awesome.min.css" rel="stylesheet">
  <!-- NProgress -->
  <link href="../vendors/nprogress/nprogress.css" rel="stylesheet">
  <!-- bootstrap-daterangepicker -->
  <link href="../vendors/bootstrap-daterangepicker/daterangepicker.css" rel="stylesheet">

  <!-- Custom Theme Style -->
  <link href="../build/css/custom.min.css" rel="stylesheet">
  </script>

</head>

<body class="nav-md">
  <div class="container body">
    <div class="main_container">
      <div class="col-md-3 left_col">
        <div class="left_col scroll-view">
          <div class="navbar nav_title" style="border: 0;">
            <a href="index.html" class="site_title"><i class="fa fa-paw"></i> <span>ALBATEL</span></a>
          </div>

          <div class="clearfix"></div>

          <!-- menu profile quick info -->
          <div class="profile clearfix">
            <div class="profile_pic">
              <img src="images/img.jpg" alt="..." class="img-circle profile_img">
            </div>
            <div class="profile_info">
              <span>Welcome,</span>
              <h2 id="userNamesOne">John Doe</h2>
            </div>
          </div>
          <!-- /menu profile quick info -->

          <br />

          <!-- sidebar menu -->
          <div id="sidebar-menu" class="main_menu_side hidden-print main_menu">
            <div class="menu_section">
              <h3>Questionnaire</h3>
              <ul class="nav side-menu">
                <li><a><i class="fa fa-home"></i> Home <span class="fa fa-chevron-down"></span></a>
                  <ul class="nav child_menu">
                    <li><a href="index.html">Dashboard</a></li>
                  </ul>
                </li>
                <li><a><i class="fa fa-globe"></i> Policies <span class="fa fa-chevron-down"></span></a>
                  <ul class="nav child_menu">
                    <li><a href="form_wizards.html">Part 1</a></li>
                    <li><a href="form_upload.html">Part 2</a></li>
                  </ul>
                </li>
                <li><a><i class="fa fa-line-chart"></i> Development<span class="fa fa-chevron-down"></span></a>
                  <ul class="nav child_menu">
                    <li><a href="chartjs.html">Part 1</a></li>
                    <li><a href="chartjs2.html">Part2</a></li>
                  </ul>
                </li>
                <li><a><i class="fa fa-sitemap"></i>Employee<span class="fa fa-chevron-down"></span></a>
                  <ul class="nav child_menu">
                    <li><a href="fixed_sidebar.html">Part 1</a></li>
                    <li><a href="fixed_footer.html">Part 2</a></li>
                  </ul>
                </li>
              </ul>
            </div>
            <div class="menu_section">
              <h3>User</h3>
              <ul class="nav side-menu">
                <li><a><i class="fa fa-info-circle"></i> Corporate Information
                    <span class="fa fa-chevron-down"></span></a>
                  <ul class="nav child_menu">
                    <li><a href="viewInformation.html">View Information</a></li>
                    <li><a href="editInformation.html">Edit Information</a></li>
                  </ul>
                </li>
                <li><a><i class="fa fa-file-text"></i> Report <span class="fa fa-chevron-down"></span></a>
                  <ul class="nav child_menu">
                    <li><a href="viewReport.html">View</a></li>

                  </ul>
                </li>
              </ul>
            </div>

          </div>
          <!-- /sidebar menu -->


        </div>
      </div>

      <!-- top navigation -->
      <div class="top_nav">
        <div class="nav_menu">
          <div class="nav toggle">
            <a id="menu_toggle"><i class="fa fa-bars"></i></a>
          </div>
          <nav class="nav navbar-nav">
            <ul class=" navbar-right">
              <li class="nav-item dropdown open" style="padding-left: 15px;">
                <a href="javascript:;" class="user-profile dropdown-toggle" aria-haspopup="true" id="navbarDropdown"
                  data-toggle="dropdown" aria-expanded="false">
                  <img src="images/img.jpg" alt=""><span id="userNamesTwo">John Doe</span>
                </a>
                <div class="dropdown-menu dropdown-usermenu pull-right" aria-labelledby="navbarDropdown">
                  <a class="dropdown-item" href="viewInformation.html"> Profile</a>
                  <a class="dropdown-item" href="editInformation.html">
                    <span>Edit</span>
                  </a>
                  <a class="dropdown-item" href="https://albatel.ie/contact-us/">Contact us</a>
                  <a class="dropdown-item" href="login.html"><i class="fa fa-sign-out pull-right"></i> Log Out</a>
                </div>
              </li>

            </ul>
          </nav>
        </div>
      </div>
      <!-- /top navigation -->

      <!-- page content -->
      <div class="right_col" role="main">
        <div class="">
          <div class="page-title">
            <div class="title_left" style="width: 100%;">
              <h4 style="float: left;">This is your REPORT!</h4>
              <div style="float: right;height: 100%;width: 100px;">
                <button style="width: 100%;height: 100%;" onclick="download()">下载</button>
              </div>
            </div>

            <div class="title_right">
              <div class="col-md-5 col-sm-5  form-group pull-right top_search">
              </div>
            </div>
          </div>

          <div class="clearfix"></div>

          <div class="row">
            <div class="col-md-12 col-sm-12 ">
              <div class="x_panel">
                <div class="x_title">
                  <ul class="nav navbar-right panel_toolbox">
                  </ul>
                  <div class="clearfix">
                    <h1 id="Title1">Legal Compliance<br></h1>
                    <h3>
                      <span id="Results1" style="word-break:break-all;">111111111111<br>111111111</span>
                    </h3>
                    <h1 id="Title2">Legal Compliance<br></h1>
                    <h3>
                      <span id="Results2" style="word-break:break-all;">111111111111<br>111111111</span>
                    </h3>
                    <h1 id="Title3">Legal Compliance<br></h1>
                    <h3 >
                      <span id="Results3" style="word-break:break-all;">111111111111<br>111111111</span>
                    </h3>
                    <h1 id="Title4">Legal Compliance<br></h1>
                    <h3>
                      <span id="Results4" style="word-break:break-all;">111111111111<br>111111111</span>
                    </h3>
                    <h1 id="Title5">Legal Compliance<br></h1>
                    <h3>
                      <span id="Results5" style="word-break:break-all;">111111111111<br>111111111</span>
                    </h3>
                    <h1 id="Title6">Legal Compliance<br></h1>
                    <h3>
                      <span id="Results6" style="word-break:break-all;">111111111111<br>111111111</span>
                    </h3>
                    <h1 id="Title7">Legal Compliance<br></h1>
                    <h3>
                      <span id="Results7" style="word-break:break-all;">111111111111<br>111111111</span>
                    </h3>
                    <h1 id="Title8">Legal Compliance<br></h1>
                    <h3>
                      <span id="Results8" style="word-break:break-all;">111111111111<br>111111111</span>
                    </h3>
                    <h1 id="Title9">Legal Compliance<br></h1>
                    <h3>
                      <span id="Results9" style="word-break:break-all;">111111111111<br>111111111</span>
                    </h3>
                    <h1 id="Title10">Legal Compliance<br></h1>
                    <h3>
                      <span id="Results10" style="word-break:break-all;">111111111111<br>111111111</span>
                    </h3>
                    <h1 id="Title11">Legal Compliance<br></h1>
                    <h3>
                      <span id="Results11" style="word-break:break-all;">111111111111<br>111111111</span>
                    </h3>
                    <h1 id="Title12">Legal Compliance<br></h1>
                    <h3>
                      <span id="Results12" style="word-break:break-all;">111111111111<br>111111111</span>
                    </h3>
                    <h1 id="Title13">Legal Compliance<br></h1>
                    <h3>
                      <span id="Results13" style="word-break:break-all;">111111111111<br>111111111</span>
                    </h3>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <!-- /page content -->

    <!-- footer content -->
    <footer>
      <div class="pull-right">
        To learn more - Go to the website <a href="https://albatel.ie/">ALBATEL</a>
      </div>
      <div class="clearfix"></div>
    </footer>
    <!-- /footer content -->
  </div>
  </div>

  <!-- jQuery -->
  <script src="../vendors/jquery/dist/jquery.min.js"></script>
  <!-- Bootstrap -->
  <script src="../vendors/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
  <!-- FastClick -->
  <script src="../vendors/fastclick/lib/fastclick.js"></script>
  <!-- NProgress -->
  <script src="../vendors/nprogress/nprogress.js"></script>
  <!-- morris.js -->
  <script src="../vendors/raphael/raphael.min.js"></script>
  <script src="../vendors/morris.js/morris.min.js"></script>
  <!-- bootstrap-progressbar -->
  <script src="../vendors/bootstrap-progressbar/bootstrap-progressbar.min.js"></script>
  <!-- bootstrap-daterangepicker -->
  <script src="../vendors/moment/min/moment.min.js"></script>
  <script src="../vendors/bootstrap-daterangepicker/daterangepicker.js"></script>

  <!-- Custom Theme Scripts -->
  <script src="../build/js/custom.min.js"></script>
  <script src="./js/utils.js"></script>

  <script>
    let user = getUser();
    let account = user.account;
    let rqeuests = rqeuest("/user/getReport/" + account, 'GET');

    // console.log(rqeuests);
    for (let i = 0; i < 13; i++) {
      document.getElementById('Title' + (i + 1)).innerHTML = rqeuests.data[i].title ? rqeuests.data[i].title : '';
      let datas = rqeuests.data[i].results.split('\n');
      let data = '';
      for (let l = 0; l < datas.length; l++) {
        if (l == 0)
          data = data + datas[l];
        else
          data = data + '<br>' + datas[l];
      }
      document.getElementById('Results' + (i + 1)).innerHTML = rqeuests.data[i].results ? rqeuests.data[i].results : '';
    }

    function download() {
      let re = rqeuest("/user/generate/" + account, 'GET');
      // console.log(re.status == null);
      if (re == null) {
        alert("最后结果已经生成到对应目录");
      } else {
        alert(re.message);
      }
    }

  </script>

</body>

</html>